Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify querying all descendants #15400

Merged
merged 1 commit into from Mar 24, 2017
Merged

Conversation

mikeybyker
Copy link
Contributor

Updated example to illustrate @ContentChildren default behaviour (only query direct children), and how to query for nested elements/all descendants.
PR Close #14417

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Other... Please describe: Example in docs updated

What is the current behavior? (You can also link to an open issue here)

What is the new behavior?

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

`
})
export class Tab {
@ContentChildren(Pane) panes: QueryList<Pane>;
@ContentChildren(Pane, { descendants: true }) allPanes: QueryList<Pane>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe rename:

  • panes -> topLevelPanes
  • allPanes -> arbitraryNestedPanes

to make it even clearer ?

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR:

  • please consider addressing the feedback,
  • update the spec
  • squash your commit into a single one.

Thanks !

@vicb vicb added area: core Issues related to the framework runtime comp: docs labels Mar 22, 2017
@mikeybyker mikeybyker force-pushed the master branch 2 times, most recently from fc348b5 to 7413906 Compare March 23, 2017 10:54
@mikeybyker
Copy link
Contributor Author

Requested changes plus the updated spec commited and squashed

@vicb
Copy link
Contributor

vicb commented Mar 23, 2017

Thanks !

@vicb vicb added the action: merge The PR is ready for merge by the caretaker label Mar 23, 2017
@DzmitryShylovich
Copy link
Contributor

DzmitryShylovich commented Mar 23, 2017

duplicated commit message http://prntscr.com/enlaiu

docs: clarify querying all descendants …
Updated example to illustrate @ContentChildren default behaviour (only query direct children), and how to query for nested elements/all descendants.
PR Close #14417
docs: clarify querying all descendants
Updated example to illustrate @ContentChildren default behaviour (only query direct children), and how to query for nested elements/all descendants.
PR Close #14417
docs: clarify querying nested descendants
test: Adding test for nested descendants
docs: clarify querying all descendants

@mikeybyker
Copy link
Contributor Author

Duplicated messages must have sneaked in when I rebased/squashed commits together, sorry.

@vicb
Copy link
Contributor

vicb commented Mar 23, 2017

@mikeybyker could you amend the commit message please ?

@mikeybyker
Copy link
Contributor Author

@vicb yes, that's amended now...

@mikeybyker mikeybyker changed the title docs(examples): clarify querying all descendants docs: clarify querying all descendants Mar 24, 2017
Updated example to illustrate @ContentChildren default behaviour (only query direct children), and how to query for nested elements/all descendants. PR Close angular#14417
@vicb
Copy link
Contributor

vicb commented Mar 24, 2017

Thanks !

@vicb vicb merged commit ea848f7 into angular:master Mar 24, 2017
sjtrimble pushed a commit to sjtrimble/angular that referenced this pull request Mar 25, 2017
Fixes angular#14417
Updated example to illustrate @ContentChildren default behavior (only query direct children), and how to query for nested elements/all descendants.
vicb pushed a commit that referenced this pull request Mar 29, 2017
Fixes #14417
Updated example to illustrate @ContentChildren default behavior (only query direct children), and how to query for nested elements/all descendants.
asnowwolf pushed a commit to asnowwolf/angular that referenced this pull request Aug 11, 2017
Fixes angular#14417
Updated example to illustrate @ContentChildren default behavior (only query direct children), and how to query for nested elements/all descendants.
juleskremer pushed a commit to juleskremer/angular that referenced this pull request Aug 28, 2017
Fixes angular#14417
Updated example to illustrate @ContentChildren default behavior (only query direct children), and how to query for nested elements/all descendants.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add better docs for @ContentChildren descendants
4 participants